package com.youbo.form;


import com.youbo.common.validator.group.AddGroup;
import com.youbo.common.validator.group.UpdateGroup;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@Data
public class RequestOrder {

    public RequestOrder(String orderNo, String title, String description, Double amount){
        this.orderNo=orderNo;
        this.orderTitle=title;
        this.order_description=description;
        this.amount=amount;
    }
    public RequestOrder(String orderNo, String title, String description, Double amount, Long userId){
        this.orderNo=orderNo;
        this.orderTitle=title;
        this.order_description=description;
        this.amount=amount;
        this.userId=userId;
    }
    public RequestOrder(String orderNo, String title, String description, Double amount, String authcode){
        this.orderNo=orderNo;
        this.orderTitle=title;
        this.order_description=description;
        this.amount=amount;
        this.authcode=authcode;
    }

    public RequestOrder(String orderNo){
        this.orderNo=orderNo;
    }
    public RequestOrder(){
    }

    @NotBlank(message="订单号不能为空", groups = {AddGroup.class, UpdateGroup.class})
    private String orderNo;
    @NotBlank(message="订单标题不能为空", groups = {AddGroup.class,UpdateGroup.class})
    private String orderTitle;
    @NotBlank(message="订单说明不能为空", groups = {AddGroup.class,UpdateGroup.class})
    private String order_description;

    @NotNull(message="订单金额不能为空", groups = {AddGroup.class,UpdateGroup.class})
    private Double amount;

    @ApiModelProperty("微信支付宝 授权码 没有可不填")
    private String authcode;

    private Long userId;

    private String mchntCd;
}
